package com.cdtye.shuoh.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


@Getter
@AllArgsConstructor
public enum DeviceConnectStatus {
    /**
     * 初始化
     */
    INIT("INIT","INIT","未连接"),

    /**
     * 在线
     */
    ONLINE("ONLINE","ONLINE","在线"),

    /**
     * 离线
     */
    OFFLINE("OFFLINE","OFFLINE","离线");

    private  String key;
    private  String value;
    private String tag;

    public static DeviceConnectStatus parseByValue(String value){
        if(value == null){
            return null;
        }
        for (DeviceConnectStatus d : DeviceConnectStatus.values()) {
            if (d.getValue().equals(value)) {
                return d;
            }
        }
        return null;

    }
}
